data "huaweicloud_images_image" "ecs_image_ubuntu_2004" {
  name        = "Ubuntu 20.04 server 64bit"
  most_recent = true
}
data "huaweicloud_images_image" "ecs_image_ubuntu_2204" {
  name        = "Ubuntu 22.04 server 64bit"
  most_recent = true
}
data "huaweicloud_images_image" "ecs_image_centos_79" {
  name        = "CentOS 7.9 64bit"
  most_recent = true
}

/* data "huaweicloud_compute_flavors" "ecs_1c1g" {
  availability_zone = "${var.REGION}c"
  performance_type  = "normal"
  cpu_core_count    = 1
  memory_size       = 1
} */

data "huaweicloud_compute_flavors" "ecs_4c8g" {
  availability_zone = "${var.REGION}c"
  performance_type  = "normal"
  cpu_core_count    = 4
  memory_size       = 8
}
data "huaweicloud_compute_flavors" "ecs_4c16g" {
  availability_zone = "${var.REGION}c"
  performance_type  = "normal"
  cpu_core_count    = 4
  memory_size       = 16
}
data "huaweicloud_compute_flavors" "ecs_8c16g" {
  availability_zone = "${var.REGION}c"
  performance_type  = "normal"
  cpu_core_count    = 8
  memory_size       = 16
}
data "huaweicloud_compute_flavors" "ecs_8c32g" {
  availability_zone = "${var.REGION}c"
  performance_type  = "normal"
  cpu_core_count    = 8
  memory_size       = 32
}

data "terraform_remote_state" "subnet" {
  backend = "remote"
  config = {
    hostname : "baidu.jfrog.io"
    organization : "baidu-hub-terraform-state-dev"
    workspaces = {
      name : "ap-southeast-3-subnet-dev"
    }
  }
}

data "terraform_remote_state" "eip" {
  backend = "remote"
  config = {
    hostname : "baidu.jfrog.io"
    organization : "baidu-hub-terraform-state-dev"
    workspaces = {
      name : "ap-southeast-3-eip-dev"
    }
  }
}

data "terraform_remote_state" "vsg" {
  backend = "remote"
  config = {
    hostname : "baidu.jfrog.io"
    organization : "baidu-hub-terraform-state-dev"
    workspaces = {
      name : "ap-southeast-3-vsg-dev"
    }
  }
}

data "terraform_remote_state" "keypair" {
  backend = "remote"
  config = {
    hostname : "baidu.jfrog.io"
    organization : "baidu-hub-terraform-state-dev"
    workspaces = {
      name : "ap-southeast-3-keypair-dev"
    }
  }
}